have a useful line reporting when IOMMU_BUG_ON trigger
authorvh249@arcadians.cl.cam.ac.uk <vh249@arcadians.cl.cam.ac.uk>
Wed, 17 Aug 2005 15:09:31 +0000 (15:09 +0000)
committervh249@arcadians.cl.cam.ac.uk <vh249@arcadians.cl.cam.ac.uk>
Wed, 17 Aug 2005 15:09:31 +0000 (15:09 +0000)
Signed-off-by: Vincent Hanquez <vincent@xensource.com>
linux-2.6-xen-sparse/arch/xen/i386/kernel/pci-dma.c

index 481b61bc27a23f86c7ed36c23f1cf205026b75cf..c9ade99d644ba019f2868a1db91956327537ca12 100644 (file)
@@ -24,13 +24,13 @@ struct dma_coherent_mem {
        unsigned long   *bitmap;
 };
 
-static void iommu_bug(void)
-{
-       printk(KERN_ALERT "Fatal DMA error! Please use 'swiotlb=force'\n");
-       BUG();
-}
-
-#define IOMMU_BUG_ON(test) do { if (unlikely(test)) iommu_bug(); } while(0)
+#define IOMMU_BUG_ON(test) \
+do { \
+       if (unlikely(test)) { \
+               printk(KERN_ALERT "Fatal DMA error! Please use 'swiotlb=force'\n"); \
+               BUG(); \
+       } \
+} while(0)
 
 int
 dma_map_sg(struct device *hwdev, struct scatterlist *sg, int nents,